import React from 'react'
import style from './style.module.scss'
import { KnowledgeBaseRawState, KnowlegeListItem } from '../../api/patientCircle';
// 问诊咨询类型
interface parameter {
    list: KnowledgeBaseRawState[]|KnowlegeListItem[],
    getval:(item)=>any
}


const Mydownmenu: React.FC<parameter> = ({ list,getval }) => {
    const handleClick=(item)=>{
        getval(item)
    }
    return (
        <div className={style.menubox}>
            <ul className={style.menu}>
                {
                    list.map(item => {
                        return <li key={item.id} onClick={()=>{
                            handleClick(item)
                        }}>{item.departmentName?item.departmentName:item.name}</li>
                    })
                }
            </ul>
        </div>
    )
}
export default Mydownmenu